API Documentation
Public Member Functions | List of all members
nkWinUi::ThemeManager Class Referencefinal

Manages the themes within the component. More...

Inheritance diagram for nkWinUi::ThemeManager:

Public Member Functions

ThemecreateOrRetrieve (const char *name)
 
Themeget (const char *name) const
 
ThemegetActiveTheme () const
 
void setActiveTheme (Theme *theme)
 

Detailed Description

Manages the themes within the component.

A Manager is always responsible for the resources allocated using it.

Member Function Documentation

◆ createOrRetrieve()

Theme* nkWinUi::ThemeManager::createOrRetrieve ( const char *  name)

Creates if unavailable, or retrieve if available, a theme.

Parameters
nameThe name of the theme to retrieve.
Returns
A newly created theme if it was previously unavailable, or the theme already attached to the name if available.

◆ get()

Theme* nkWinUi::ThemeManager::get ( const char *  name) const

Request for a theme attached to a name.

Parameters
nameThe name of the theme wanted.
Returns
The Theme attached to the name if available, nullptr otherwise.

◆ getActiveTheme()

Theme* nkWinUi::ThemeManager::getActiveTheme ( ) const
Returns
The theme currently active.

◆ setActiveTheme()

void nkWinUi::ThemeManager::setActiveTheme ( Theme theme)

Sets the active theme to use within the component.

Parameters
themeThe theme to use when drawing the windows in the component.

The documentation for this class was generated from the following file: